const engine = require('store/src/store-engine')
const sessionStorage = [require('store/storages/sessionStorage')]
export const sessionStore = engine.createStore(sessionStorage)

const localStorage = [require('store/storages/localStorage')]
export const localStore = engine.createStore(localStorage)


const BianmabaStore = {
  localStore,
  sessionStore,
  install: function (Vue, options = {router: null}) {
    console.log("plugin:bianmaba-store is loaded,mounted on (Vue.$sessionStore、Vue.sessionStore、Vue.$localStorage、Vue.localStorage)")
    Vue.prototype.$sessionStore = Vue.prototype.sessionStore = sessionStore;
    Vue.prototype.$localStorage = Vue.prototype.localStorage = localStorage;
  }
}

export default BianmabaStore
